﻿package mortal.game.view.guide.guideUse
{
    import flash.events.*;
    import flash.utils.*;
    import mortal.mvc.core.*;

    public class GuideUseSkillBase extends View
    {
        private var _timer:Timer;

        public function GuideUseSkillBase()
        {
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._timer = new Timer(6000, 1);
            this._timer.addEventListener(TimerEvent.TIMER_COMPLETE, this.timerHandler);
            this._timer.start();
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            if (this._timer != null)
            {
                this._timer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.timerHandler);
                this._timer.stop();
                this._timer = null;
            }
            return;
        }// end function

        private function timerHandler(event:TimerEvent) : void
        {
            hide();
            return;
        }// end function

    }
}
